StreamTable

Subclass of HashMap that can read and write itself to a stream.

Constructors

Link copied to clipboard
constructor()
constructor(initialCapacity: Int)
constructor(initialCapacity: Int, loadFactor: Float)

Types

Link copied to clipboard
object Companion

Properties

Link copied to clipboard
Link copied to clipboard
open override val isEmpty: Boolean
Link copied to clipboard
open override val isStreamTable: Boolean
Link copied to clipboard
open override val isStreamVector: Boolean
Link copied to clipboard

Get an array consisting of the keys for this hashtable.

Link copied to clipboard
Link copied to clipboard
open val size: Int
Link copied to clipboard

Functions

Link copied to clipboard
open fun clear()
Link copied to clipboard
open fun clone(): Any
Link copied to clipboard
open fun containsKey(key: String): Boolean
Link copied to clipboard
open fun containsValue(value: Any?): Boolean
Link copied to clipboard
Link copied to clipboard
operator fun get(key: String, defaultVal: Any?): Any?
open operator fun get(key: String): Any?
Link copied to clipboard
fun getBoolean(key: Any, defaultVal: Boolean): Boolean

Get the boolean value associated with the given key. If there is no boolean value associated with the key, return the defaultVal.

Link copied to clipboard
fun getInt(key: Any, defaultVal: Int): Int

fun getInt(key: String, defaultVal: Int): Int

Get the integer value associated with the given key. If there is no integer value associated with the key, return the defaultVal.

Link copied to clipboard
fun getLocalizedValue(key: String, defaultValue: String?): String?

Attempts to locate a localized value within this StreamTable. Method takes the original key and then looks for alternative keys using the Locale language tag and then language. For a typical UK Locale, with a key of "key", the results would be retrieved using the keys in this order until one was found: "key.en-GB", "key.en", "key"

Link copied to clipboard
fun getLong(key: String, defaultVal: Long): Long

Get the long value associated with the given key. If there is no long value associated with the key, return the defaultVal.

Link copied to clipboard
open fun getStr(key: Any, defaultVal: String?): String?

fun getStr(key: String, defaultVal: String?): String?

Get the string value associated with the given key. If there is no value associated with the key, return the defaultVal.

Link copied to clipboard
fun getString(key: String, defaultVal: String?): String?

Get the string value associated with the given key. If there is no value associated with the key, return the defaultVal.

Link copied to clipboard

Get the list of strings associated with the given key.

Link copied to clipboard
Link copied to clipboard
fun merge(ht: HashMap<String, Any?>)
Link copied to clipboard
fun put(key: Any, value: Any?)
fun put(key: Any, value: Boolean)
fun put(key: Any, value: Int)
fun put(key: Any, value: Long)
fun put(key: Any, value: String?)
open override fun put(key: String, value: Any?): Any?

fun put(key: String, value: URL?)

Set the url value associated with this key

fun put(key: String, value: Boolean)

Set the boolean value associated with this key

fun put(key: String, value: Int)

Set the int value associated with this key

fun put(key: String, value: Long)

Set the long value associated with this key.

fun put(key: String, value: String?)

Set the string value associated with this key

Link copied to clipboard
open fun putAll(m: Map<out String, out Any?>)
Link copied to clipboard
fun readFrom(input: InputStream?)
open override fun readFrom(str: Reader?)
open override fun readFrom(str: String?)
fun readFrom(input: BufferedSource)
Link copied to clipboard
fun readFromFile(file: File?)
fun readFromFile(fileName: String?)
Link copied to clipboard
open override fun readTheRest(str: Reader?)
Link copied to clipboard
fun setField(key: Any, strList: Array<String>?)

fun setField(key: String, strList: Array<String>?)

Set the string array value associated with this key

Link copied to clipboard
Link copied to clipboard
open override fun toString(): String
Link copied to clipboard
open override fun writeTo(out: Writer?)
fun writeTo(output: BufferedSink)
open override fun writeTo(out: Writer?, prefix: String?)
Link copied to clipboard
fun writeToFile(file: File?)
fun writeToFile(fileName: String?)
Link copied to clipboard
open override fun writeToString(): String?